import ContextTodo from '../../../../src/store/contextTodo' 
import {useContext} from 'react'
const ContextChild1=()=>{

  const context =useContext(ContextTodo)
  console.log('context初始值',context);
  return (
    <div>
      子组件：使用hook获取context
      <div>
        {
          context.todoList.map(
            (item,index) => {
              <p key={index}>
                标题：{item.title}
                优先级：{item.level}
              </p>
            }
          )
        }
      </div>
    </div>
  )
}
export default ContextChild1